package com.stujyh.spring.bean;

public class User {
    private String name;

    public User() {
        System.out.println("第一步:无参构造方法执行");
    }

    public void setName(String name) {
        System.out.println("第二步:设置属性值");
        this.name = name;
    }

    public void initUser(){
        System.out.println("第四步:初始化Bean对象");
    }

    public void destroyUser(){
        System.out.println("第七步:销毁Bean对象");
    }
    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
